#ifndef WEBENGINETAB_H
#define WEBENGINETAB_H

#include <QTabWidget>
#include <QWebEnginePage>
#include <QWidget>

namespace Ui
{
    class WebEngineTab;
}
class WebEngineView;
class WebEngineTab : public QTabWidget
{
    Q_OBJECT

public:
    explicit WebEngineTab(QWidget *parent = nullptr);
    ~WebEngineTab();

    QWebEnginePage *getPage();
    void goBack();
    void goForward();
    void refresh();

signals:
    void sigLoadErrorOccurred();
    void downloadRequested(QWebEngineDownloadItem *item);


public slots:
    void createTab(const QString &url);

private:
    Ui::WebEngineTab *ui;
};

#endif // WEBENGINETAB_H
